﻿using System;

namespace Oxage.Midi
{
	/// <summary>
	/// Implements a filter that redirects data from Port1 to Port2 connector and vice versa.
	/// </summary>
	public interface IFilter
	{
		/// <summary>
		/// When implemented gets or sets the first connector.
		/// </summary>
		IConnector Port1 { get; set; }

		/// <summary>
		/// When implemented gets or sets the second connector.
		/// </summary>
		IConnector Port2 { get; set; }

		/// <summary>
		/// When implemented opens both connectors.
		/// </summary>
		/// <returns></returns>
		bool Open();

		/// <summary>
		/// When implemented closes both connectors.
		/// </summary>
		void Close();
	}
}
